﻿namespace JadeX.HtmlMarkupMinifier
{
    using Orchard.Localization;
    using Orchard.Security;
    using Orchard.UI.Navigation;

    public class AdminMenu : INavigationProvider
    {
        public Localizer T { get; set; }
        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.Add(this.T("Settings"), menu => menu
                .Add(this.T("Html Minification"), "9.9", subMenu => subMenu.Action("Index", "Admin", new { area = "JadeX.HtmlMarkupMinifier" }).Permission(StandardPermissions.SiteOwner)
                    .Add(this.T("Features"), "10.0", item => item.Action("Index", "Admin", new { area = "JadeX.HtmlMarkupMinifier" }).Permission(StandardPermissions.SiteOwner).LocalNav())
                    .Add(this.T("Exclusions"), "11.0", item => item.Action("Exclusions", "Admin", new { area = "JadeX.HtmlMarkupMinifier" }).Permission(StandardPermissions.SiteOwner).LocalNav())
            ));
        }
    }
}
